﻿namespace MSPE.Public.FOSS.AutoStatusPlus.Common
{
    internal static class GlobalConstants
    {
        #region Initial Setting Values
        internal const string DbNameInitialValue = "Undefined";
        internal const string DbPasswordInitialValue = "Undefined";
        internal const string DbServerInitialValue = "Undefined";
        internal const string DbUseIntegratedAuthInitialValue = "False";
        internal const string DbUserInitialValue = "Undefined";
        internal const string EventInitialValue = "Undefined";
        internal const string LogFilePathInitialValue = "Undefined";
        internal const string LogFilePrefixInitialValue = "Undefined";
        internal const string LogTimesheetEventsInitialValue = "False";
        internal const string LogUpdatesInitialValue = "False";
        internal const string NewLogFileEveryHourInitialValue = "False";
        internal const string PollingIntervalInitialValue = "0";
        internal const string ProcessBlankLinesInitialValue = "False";
        internal const string SspHostnameInitialValue = "Undefined";
        internal const string SspNameInitialValue = "Undefined";
        internal const string SubmitUpdatesInitialValue = "False";
        internal const string UrlInitialValue = "Undefined";
        internal const string WebIsConfiguredInitialValue = "False";
        #endregion // Initial Setting Values

        #region Default Setting Values
        internal const bool LogTimesheetEventsDefaultValue = true;
        internal const bool LogUpdatesDefaultValue = true;
        internal const bool NewLogFileEveryHourDefaultValue = true;
        internal const bool ProcessBlankLinesDefaultValue = false;
        internal const bool SubmitUpdatesDefaultValue = true;
        internal const int PollingIntervalDefaultValue = 1;
        internal const string LogFilePathDefaultValue = "C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\12\\LOGS";
        internal const string LogFilePrefixDefaultValue = "Undefined";
        internal const TimesheetEventEnum EventDefaultValue = TimesheetEventEnum.OnUpdating;
        #endregion // Default Setting Values

        #region Setting Keys
        internal const string DbNameKey = "MSPE.Public.FOSS.AutoStatusPlus.DbName";
        internal const string DbPasswordKey = "MSPE.Public.FOSS.AutoStatusPlus.DbPassword";
        internal const string DbServerKey = "MSPE.Public.FOSS.AutoStatusPlus.DbServer";
        internal const string DbUseIntegratedAuthKey = "MSPE.Public.FOSS.AutoStatusPlus.DbUseIntegratedAuth";
        internal const string DbUserKey = "MSPE.Public.FOSS.AutoStatusPlus.DbUser";
        internal const string EventKey = "MSPE.Public.FOSS.AutoStatusPlus.Event";
        internal const string LogFilePathKey = "MSPE.Public.FOSS.AutoStatusPlus.LogFilePath";
        internal const string LogFilePrefixKey = "MSPE.Public.FOSS.AutoStatusPlus.LogFilePrefix";
        internal const string LogTimesheetEventsKey = "MSPE.Public.FOSS.AutoStatusPlus.LogTimesheetEvents";
        internal const string LogUpdatesKey = "MSPE.Public.FOSS.AutoStatusPlus.LogUpdates";
        internal const string NewLogFileEveryHourKey = "MSPE.Public.FOSS.AutoStatusPlus.NewLogFileEveryHour";
        internal const string PollingIntervalKey = "MSPE.Public.FOSS.AutoStatusPlus.PollingInterval";
        internal const string ProcessBlankLinesKey = "MSPE.Public.FOSS.AutoStatusPlus.ProcessBlankLines";
        internal const string SspHostnameKey = "MSPE.Public.FOSS.AutoStatusPlus.SspHostname";
        internal const string SspNameKey = "MSPE.Public.FOSS.AutoStatusPlus.SspName";
        internal const string SubmitUpdatesKey = "MSPE.Public.FOSS.AutoStatusPlus.SubmitUpdates";
        internal const string UrlKey = "MSPE.Public.FOSS.AutoStatusPlus.Url";
        internal const string WebIsConfiguredKey = "MSPE.Public.FOSS.AutoStatusPlus.WebIsConfigured";
        #endregion // Setting Keys

        #region Param Names
        internal const string DbNameParamName = "dbname";
        internal const string DbPasswordParamName = "dbpass";
        internal const string DbServerParamName = "dbserver";
        internal const string DbUseIntegratedAuthParamName = "useintegratedauth";
        internal const string DbUserParamName = "dbuser";
        internal const string EventParamName = "event";
        internal const string LogFilePathParamName = "logfilepath";
        internal const string LogFilePrefixParamName = "logfileprefix";
        internal const string LogTimesheetEventsParamName = "logtimesheetevents";
        internal const string NewLogFileEveryHourParamName = "newlogfileeveryhour";
        internal const string OffParamName = "off";
        internal const string PollingIntervalParamName = "interval";
        internal const string SspHostnameParamName = "ssphostname";
        internal const string SspNameParamName = "sspname";
        internal const string UrlParamName = "url";
        internal const string VerboseParamName = "verbose";
        #endregion // Param Names

        #region SQL Object Names
        internal const string SqlAddTimesheetProcName = "tsAutoStatusPlusAddTimesheet";
        internal const string SqlCreateScriptName = "DbScripts.CreateDBObjects.sql";
        internal const string SqlDataTableName = "tsAutoStatusPlusData";
        internal const string SqlDropScriptName = "DbScripts.DropDBObjects.sql";
        internal const string SqlGetUnprocessedTimesheetsProcName = "tsAutoStatusPlusGetUnprocessedTimesheets";
        internal const string SqlMarkTimesheetAsFailedProcName = "tsAutoStatusPlusSetTimesheetFailed";
        internal const string SqlMarkTimesheetAsProcessedProcName = "tsAutoStatusPlusSetTimesheetProcessed";
        #endregion // SQL Object Names

        #region Misc
        internal const int EventHandlerOrder = 1;
        internal const int PwaSiteTemplateId = 6221;
        internal const int TimerJobBeginSecond = 0;
        internal const int TimerJobEndSecond = 0;
        internal static readonly int[] EventHandlerEvents =
            new[] {(int)TimesheetEventEnum.OnUpdated, (int)TimesheetEventEnum.OnUpdating,
            (int)TimesheetEventEnum.OnSubmitted, (int)TimesheetEventEnum.OnSubmitting,
            (int)TimesheetEventEnum.OnReviewed, (int)TimesheetEventEnum.OnReviewing};
        internal const string EventHandlerDescription = "Statusing event handler for AutoStatusPlus";
        internal const string EventHandlerName = "TSEventHandler";
        internal const string EventHandlerClass = "MSPE.Public.FOSS.AutoStatusPlus.EventHandler." + EventHandlerName;
        internal const string TimerJobBaseName = "AutoStatusPlusStatusingJob";
        #endregion // Misc
    }
}
